package net.starwifi.duobao.repository;

import net.starwifi.duobao.entity.Member;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;

/**
 * Created by Administrator on 2015/7/16.
 */
public interface MemberRepository extends Repository<Member,Long> {

    @Query("select m from net.starwifi.duobao.entity.Member m where m.username=?1 or m.mobile=?1 ")
    Member findByUsernameOrMobile(String value);

    Member findByUsername(String username);

    Member findByMobile(String mobile);

    Member findByWxOpenId(String wxOpenId);

}
